package com.aiex.framework.boot.core;

import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * aiex-boot启动配置相关
 */
public class AiExApplication {

    /**
     * 容器启动
     * @param source
     * @param args
     * @return
     */
   public static ConfigurableApplicationContext run(Class<?> source, String... args){
       SpringApplicationBuilder springApplicationBuilder = buildSpringApplicationBuilder(source, args);
       return springApplicationBuilder.run(args);
   }

    /**
     * 容器启动配置
     * @return
     */
   private static SpringApplicationBuilder buildSpringApplicationBuilder(Class<?> source, String... args){
       return new SpringApplicationBuilder(source);
   }


}
